package com.mini.framework.communicate.mina.protocol;

import org.apache.mina.core.buffer.IoBuffer;

public interface Decoder {
	/**
	 * 是否可解码.
	 * 
	 * @param byteBuffer
	 * @return
	 */
	public DecodeResult decodeAble(IoBuffer byteBuffer);
	
	/**
	 * 字节解码成对象.
	 * 
	 * @param byteBuffer
	 * @return
	 */
	public Msg decode(IoBuffer byteBuffer);

}
